<template>
  <div style="height: 100vh;background-image: linear-gradient(135deg,#1352F2,#3C82F5);overflow: hidden;">
    <el-container style="padding: 30px;">
      <el-header>
        <el-row :gutter="10">
          <el-col :span="3">
            <img src="/imgs/login/logo.png" style="height: 50px;">
          </el-col>
          <el-col :span="1">
            <img src="/imgs/login/auto.png" style="height: 50px;">
          </el-col>
          <el-col :span="1">
            <img src="/imgs/login/verticalLine.png" style="height: 50px;">
          </el-col>
          <el-col :span="19">
            <span style="color: #fff;font-size: 30px; font-weight: bold">智慧营销管理系统</span>
          </el-col>
        </el-row>
      </el-header>
      <el-main>
        <el-row :gutter="40">
          <el-col :span="16">
            <img src="/imgs/login/bg.png" alt="登录背景图" style=" width: 100%; margin-top: 60px;">
          </el-col>
          <el-col :span="8">
            <el-card style="margin-top: 80px">
              <h3 style="text-align: center;">选择登录方式</h3>
              <el-form label-position="top">
                <!-- 商家登录按钮 -->
                <el-button type="primary" block @click="goToBusinessLogin">商家登录</el-button>
                <!-- 用户登录按钮 -->
                <el-button type="info" block @click="goToUserLogin">用户登录</el-button>
              </el-form>
            </el-card>
          </el-col>
        </el-row>
      </el-main>
    </el-container>
  </div>
</template>

<script setup>
import { ref } from "vue";
import axios from "axios";
import { ElMessage } from "element-plus";
import router from "@/router";

// 跳转到商家登录页面
const goToBusinessLogin = () => {
  window.location.href = '/business-login';
};

// 跳转到用户登录页面
const goToUserLogin = () => {
  router.push('/user-login');
};
</script>

<style scoped>

</style>